package cn.sciento.farm.devicemanager.api.jsonrpc;

import cn.sciento.farm.devicemanager.common.constant.ResultConstant;
import cn.sciento.farm.devicemanager.dao.entity.DevCamera;
import cn.sciento.farm.devicemanager.dao.model.ResponseMessage;
import cn.sciento.farm.devicemanager.sensor.Error;
import cn.sciento.farm.devicemanager.sensor.*;
import cn.sciento.farm.devicemanager.service.CameraService;
import cn.sciento.fluorite.response.WebLiveAddress;
import com.googlecode.jsonrpc4j.JsonRpcMethod;
import com.googlecode.jsonrpc4j.JsonRpcParam;
import com.googlecode.jsonrpc4j.JsonRpcService;
import io.grpc.stub.StreamObserver;
import net.devh.boot.grpc.server.service.GrpcService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.UnsupportedEncodingException;
import java.util.List;

/**
 * 摄像头管理
 */
@JsonRpcService("rpc/hardware.camera")
public interface CameraJsonApi {

    ResponseMessage create(DevCamera camera,String validateCode);

    ResponseMessage update(DevCamera camera);

    ResponseMessage  get(Long id);

    ResponseMessage list(Integer areaId) ;

    ResponseMessage delete(Long id) ;


    @JsonRpcMethod("get_live")
    ResponseMessage getLive(Long id);

    @JsonRpcMethod("control_ptz")
    ResponseMessage controlPTZ(Long id ,int direction,int speed) ;

    @JsonRpcMethod("get_multi_live")
    ResponseMessage getMultiLive(String ids);
}
